import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
// 引入全局css定义
import './assets/css/global.css'
//跨浏览器的css动画库
import 'animate.css'


// 引入element-ui
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// 解决element中upload跨域
import VueResource from 'vue-resource'
//实现手写电子签名组件
import VueEsign from 'vue-esign'
//解决$ is not defined
import $ from 'jquery'
//解决：Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See 
//但是如何使用default-passive-events会出现报错Unable to preventDefault inside passive event listener invocation.https://blog.csdn.net/weixin_40648700/article/details/115084573
//  import 'default-passive-events'

//引入拖拽指令
 import draggle from "@/utils/draggle";
//i18n国际化
 import i18n from '@/i18n/index'

Vue.use(Element,
  {
    i18n: (key, value) => i18n.t(key, value)
  }
)
Vue.use(draggle)
window.$ = $
window.jQuery = $

Vue.use(VueResource)
//
Vue.$message = Element.Message
Vue.use(Element,{
  i18n: (key, value) => i18n.t(key, value)})
Vue.use(VueEsign)

Vue.config.productionTip = false
Vue.config.devtools = true

new Vue({
  router, // 将路由注册为插件，即将router配置参数注入路由，使路由在整个应用中生效
  store,
  i18n,
  render: h => h(App),
  // beforeCreate 位于数据挂载之前的生命周期函数
  beforeCreate () {
    // 安装全局事件总线   $bus就是当前应用的vm  这里的this就是当前的new Vue()
    Vue.prototype.$bus = this
  }
}).$mount('#app')
